package com.gitee.wsl.io.channel.write.ext

import com.gitee.wsl.annotation.InternalAPI
import com.gitee.wsl.io.channel.CHANNEL_MAX_SIZE
import com.gitee.wsl.io.channel.write.ByteWriteChannel
import com.gitee.wsl.io.size

@OptIn(InternalAPI::class)
val ByteWriteChannel.availableForWrite: Int
    get() = CHANNEL_MAX_SIZE - writeBuffer.size

